package com.jz.controller;

import com.jz.module.dto.TTaskDto;
import com.jz.service.TaskService;
import com.jz.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/task")
public class TaskController {

    @Autowired
    private TaskService taskService;


    @RequestMapping("/page")
    public ResultUtil page(TTaskDto dto) {
        return taskService.page(dto);
    }

    @RequestMapping("/query")
    public ResultUtil query(TTaskDto dto) {
        return taskService.query(dto);
    }


    @RequestMapping("/save")
    public ResultUtil save(TTaskDto dto) {
        return taskService.save(dto);
    }

    @RequestMapping("/delete")
    public ResultUtil delete(TTaskDto dto) {
        return taskService.delete(dto);
    }

}
